﻿using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;

public class RightArrowButton : MonoBehaviour {

	public MainController controller;

	void Start(){

		Button btn = GetComponent<Button> ();
		btn.onClick.AddListener (delegate() {
			this.OnClick();	
		});

	}

	public void OnClick() {

		Button btn = GetComponent<Button> ();

		btn.enabled = false;

		controller.Next ( ()=>{
			btn.enabled = true;
		});

	}


}
